<script setup lang="ts">
import { useRoute } from 'vue-router';
import {computed} from "vue";

const route = useRoute();

// 根据路由的 meta 信息决定是否显示导航栏和底部栏
const showNavBar = computed(() => route.meta.showNavBar ?? true);
const showTabBar = computed(() => route.meta.showTabBar ?? true);
</script>

<template>

  <van-nav-bar v-if="showNavBar" title="麦语伙伴" />

  <router-view />
<div style="margin-top: 50px">
  <van-tabbar v-if="showTabBar" route>
    <van-tabbar-item replace to="/home/friends" icon="home-o">主页</van-tabbar-item>
    <van-tabbar-item replace to="/home/more" icon="apps-o">更多</van-tabbar-item>
    <van-tabbar-item replace to="/home/user" icon="manager-o">个人</van-tabbar-item>
  </van-tabbar>
</div>

</template>

<style scoped>

</style>